﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using EMC;

using System.IO;
using System.Reflection;

namespace TestEMC
{
    [TestClass]
    public class TestFileManagement
    {
        static string dbConfigFile = Path.GetDirectoryName(Assembly.GetAssembly(typeof(TestFileManagement)).CodeBase) + @"/db_settings.xml";
        static databaseConfiguration config = new databaseConfiguration(dbConfigFile);
        FileManagement fileman = new FileManagement(config);

        [TestMethod]
        public void TestfileAdd()
        {
//            Assert.AreEqual(fileman.addfile("myfile", "this is a file", "dave"), true);

        }

        [TestMethod]
        public void TestfileEdit()
        {
            Assert.AreEqual(fileman.editFile("myfile", "bob", "dave", "bob"), true);
        }

        [TestMethod]
        public void TestfileDel()
        {
            Assert.AreEqual(fileman.removeFile("dave", "myfile"), true);
        }
    }
}

